﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using DataLayer;

namespace BusinessLayer
{
    public class ScreenCastCTR : IScreenCastCTR
    {
        private List<ScreenCast> screenCasts;

        public ScreenCastCTR()
        {
            screenCasts = new List<ScreenCast>();
        }

        public List<ScreenCast> GetScreenCastsForMovie(string movieTitle)
        {
            List<ScreenCast> results = new List<ScreenCast>();
            foreach(ScreenCast sc in screenCasts) {
                if (sc.Movie.Title == movieTitle) {
                    results.Add(sc);
                }
            }

            return results;
        }

        public void AddScreenCast(DateTime dateTime, int priceFactor, Movie movie)
        {
            screenCasts.Add(new ScreenCast(dateTime, priceFactor, movie));
        }

        public List<ScreenCast> GetAllScreenCasts()
        {
            throw new NotImplementedException();
        }
    }
}
